import Request from './index.js'

// 图形验证码
export function getImgCode() {
	return Request.get('/captchaImage')
}

// 账号密码登录
export function login(data) {
	return Request.post('/login', data)
}

// 发短信
export function captchaSms(data) {
	return Request.get(`/captchaSms?phonenumber=${data}`)
}

// 短信登录
export function smsLogin(data) {
	return Request.post('/smsLogin', data)
}

// 邀请码验证  上门：KABQ6Y   小区：M2YG4U
export function checkInviteCode(data) {
	return Request.get(`/promoter/info/checkInviteCode/${data}`)
}

// 验证注册验证码
export function validateSmsCode(data) {
	return Request.post('/validateSmsCode', data)
}

// 注册
export function register(data) {
	return Request.post('/register', data)
}

// 获取登录信息
export function getInfo(data) {
	return Request.get(`/getInfo?Authorization=${data}`)
}

// 实名认证
export function recyclerIdcard(data) {
	return Request.post('/recycler/idcard', data)
}

// 回收设置-上门
export function recyclerSetting(data) {
	return Request.post('/recycler/recyclerSetting', data)
}

// 回收回显-上门
export function getSetting1() {
	return Request.get('/recycler/getSetting1')
}

// 回收回显-小区
export function getSetting2() {
	return Request.get('/recycler/getSetting2')
}

// 小区详情
export function quartersInfo(data) {
	return Request.get(`/basic/quarters/quartersInfoApi/${data}`)
}

// 查询小区列表
export function getQuartersList(data) {
	return Request.get(`/basic/quarters/quartersListApi?city=${data}`)
}

// 回收设置-小区
export function recyclerSetting2(data) {
	return Request.get(`/recycler/buildingApply/apply/${data}`)
}

// 回收品类
export function getCategoryList(data) {
	return Request.get(`/basic/category/categoryList?type=${data}`)
}

// 获取字典值
export function dict(data) {
	return Request.get(`/system/dict/data/type/${data}`)
}

// 待扫码任务
export function codeOrderList() {
	return Request.get(`/codeOrder/codeOrder/countQuery`)
}

// 扫码详情
export function codeOrderInfo(data) {
	return Request.get(`/codeOrder/codeOrder/queryCodeOrderById/${data}`)
}

// 扫码-提交回收单
export function recyclerScanAdd(data) {
	return Request.post(`/codeOrder/codeOrder/recyclerScanAdd`,data)
}

// 扫码待支付列表
export function payList() {
	return Request.get(`/codeOrder/codeOrder/payList`)
}

// 接单列表
export function orderTask(data) {
	return Request.post(`/order/appointment/orderTask`,data)
}

// 接单
export function receiveOrder(data) {
	return Request.get(`/order/appointment/receiveOrder/${data}`)
}

// 上门回收 任务列表
export function onDoorOrderList(data) {
	return Request.get(`/order/appointment/orderList?status=${data}`)
}

// 上门任务详情
export function onDoorOrderInfo(data) {
	return Request.get(`/order/appointment/${data}`)
}

// 用户设置
export function updateSetting(data) {
	return Request.put(`/system/user/profile`,data)
}